import { _decorator, Component, Node } from 'cc';
import { AudioManager } from '../audio/AudioManager';
import { AudioName } from '../const/EnCommon';
const { ccclass, property } = _decorator;

@ccclass('ClickBtnAudio')
export class ClickBtnAudio extends Component {

    @property(String)
    private audioName: string = "";

    start() {
        this.node.on(Node.EventType.TOUCH_END, this.OnClick, this);
    }

    OnClick()
    {
        // if (this.audioName == "") {
        //     AudioManager.instance.playEffect(AudioName.ClickButton);
        // }
        // else{
        //     AudioManager.instance.playEffect(this.audioName);
        // }
    }
}


